<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>06_JS函数</title>
</head>
<body>
<script>
    function f1(){
        console.log('f1函数被执行了')
    }
    f1();
    function f2(n){
        console.log('f2函数被执行');
        console.log(n)
    }
    f2(100);
    f2('你好');
    f2(true);

    function f3(x,y){
        console.log('f3函数被执行了');
        console.log(x+y);
    }
    f3(100,200);
    f3(1,2,3,4);
    f3(1);

    function f4(x,y){
        console.log('f4函数被执行了');
        return x+y;
    }
    var result = f4(100,200);
    console.log(result);
    console.log(f4(100,200));
    (function () {
        console.log('匿名函数被执行了');
    })();

    var f5 = function () {
        console.log('f5函数被执行了');
    }
    f5();
    console.log(f5);
    console.log(typeof f5)

    const f6 = () =>{
        console.log('f6函数被执行了');
    }
    f6();
</script>
</body>
</html>